import React from 'react';
import './App.css';
import YuLe from './components/YuLe';
import Video from './components/Video';

export default class App extends React.Component {
    state = {
        src: 'http://api.xiaohigh.com:8090/video/random'
    }

    render() {
        return <div>
            <Video src={this.state.src} change={this.change} />
        </div>;
    }

    change = () => {
        this.setState({
            src: 'http://api.xiaohigh.com:8090/video/random?t='+Date.now()
        })
    }
    
}